home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / sem_close.z / sem_close
Encoding:
Text File  |  2002-10-03  |  2.8 KB  |  66 lines

  1.  
  2.  
  3.  
  4. sssseeeemmmm____cccclllloooosssseeee((((3333CCCC))))                                                    sssseeeemmmm____cccclllloooosssseeee((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_eeee_mmmm______cccc_llll_oooo_ssss_eeee - close a posix named semaphore
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_eeee_mmmm_aaaa_pppp_hhhh_oooo_rrrr_eeee_...._hhhh_>>>>
  13.      _iiii_nnnn_tttt _ssss_eeee_mmmm______cccc_llll_oooo_ssss_eeee _((((_ssss_eeee_mmmm______tttt _****_s_e_m_))))_;;;;
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _ssss_eeee_mmmm______cccc_llll_oooo_ssss_eeee closes the connection to the named semaphore located at address
  17.      _s_e_m.  The address _s_e_m may reside anywhere in the calling processes
  18.      address space, but the process must have read and write access to _s_e_m.
  19.  
  20.      If multiple threads within a common process (i.e., sprocs, pthreads) are
  21.      sharing _s_e_m, a single call to _ssss_eeee_mmmm______cccc_llll_oooo_ssss_eeee will close the named semaphore
  22.      for all threads within the calling process.
  23.  
  24.      Once a named semaphore has been closed, subsequent operations on the
  25.      semaphore by the calling process will fail until the semaphore has been
  26.      reopened.
  27.  
  28.      If the calling process was the last process to close the semaphore, and
  29.      the semaphore has been unlinked via _ssss_eeee_mmmm______uuuu_nnnn_llll_iiii_nnnn_kkkk, then the named semaphore
  30.      will cease to exist.  Otherwise, the semaphore will persist.
  31.  
  32.      _ssss_eeee_mmmm______cccc_llll_oooo_ssss_eeee will fail if the following is true:
  33.  
  34.      [EINVAL]       The semaphore located at address _s_e_m is not a valid posix
  35.                     named semaphore.
  36.  
  37. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  38.      sem_destroy(3C), sem_init(3C), sem_getvalue(3C), sem_post(3C),
  39.      sem_wait(3C), sem_trywait(3C), sem_open(3C), sem_unlink(3C),
  40.      shm_open(3C), mmap(3C)
  41.  
  42. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  43.      Upon successful completion, a value of 0 is returned to the calling
  44.      process. Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  45.      indicate the error.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.